﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Movie.web
{
    public partial class RoomList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int  movieId =Convert.ToInt32( Session["MovieId"]);
                int  cinemaId=Convert.ToInt32(Request["CinemaID"]);
                GridView1.DataSource = BLL.ScheduleBLL.GetSchedule(movieId,cinemaId,DateTime.Now);
                GridView1.DataBind();
            }
        }
        public string GetName(int RoomID) 
        {
            Modal.Room room = BLL.RoomBLL.GetRoom(RoomID);
            return room.Name;
        }


        protected void SelectSeat_Command(object sender, CommandEventArgs e)
        {
            string id=e.CommandArgument.ToString();
            Response.Redirect("~/SeatSelect.aspx?ScheduleID="+id);
        }

       
    }
}